/**
 * @Project TMHSCFX
 * @Author Tran Manh Hung
 * @Email: hungtmit@gmail.com | tmh@xwebgate.com
 * @Copyright © 2011 TMH. All rights reserved
 * @Createdate Apr 14, 2011
 * @Createtime 10:53:15 AM
 */

package com.tmh.study.fAS3AMTM.chap4
{
	import flash.display.Loader;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.net.URLRequest;

	public class LoadAsset extends Sprite
	{
		public function LoadAsset()
		{
			super();
			addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
		}

		private function addedToStageHandler(event:Event):void
		{
			initData();
		}

		private function initData():void
		{
			var loader:Loader = new Loader();
			addChild(loader);
			loader.load(new URLRequest("assets/picture.jpg"));
		}
	}
}